#ifndef RANDOM_HYPERPLANE_CLASSIFIER_H__CMU_
#define RANDOM_HYPERPLANE_CLASSIFIER_H__CMU_

#include "resample_classifier.h"

#define RANDOM_HYPERPLANE_CLASSIFIER "random_hyperplane_classifier"

#include <vector>
using namespace std;

class random_hyperplane_classifier : public resample_classifier {
protected :
	resample_classifier * best_classifier;
	boosting_problem * best_problem;
	vector<double> best_w;
public :
	virtual double test(boosting_node * x);
	virtual void load(string filename);
	virtual void dump(string filename);
	virtual string get_type() {return RANDOM_HYPERPLANE_CLASSIFIER;}
	void train(boosting_problem & prob, int argc, char ** argv);
	random_hyperplane_classifier();
	~random_hyperplane_classifier();
protected :
	virtual void get_random_direction(vector<double> & w, int l);
	virtual double kernel(vector<double> & w, boosting_node * x);
	virtual double get_score(double * y, double * r, int l);

};

#endif